3.1555 \(\int \frac{1}{\sqrt{4-x} \sqrt{x}} \, dx\)

Optimal. Leaf size=10 \[ -\sin ^{-1}\left (1-\frac{x}{2}\right ) \]

[Out]

-ArcSin[1 - x/2]

________________________________________________________________________________________

Rubi [A]  time = 0.0074331, antiderivative size = 10, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {53, 619, 216} \[ -\sin ^{-1}\left (1-\frac{x}{2}\right ) \]

Antiderivative was successfully verified.

[In]

Int[1/(Sqrt[4 - x]*Sqrt[x]),x]

[Out]

-ArcSin[1 - x/2]

Rule 53

Int[1/(Sqrt[(a_) + (b_.)*(x_)]*Sqrt[(c_.) + (d_.)*(x_)]), x_Symbol] :> Int[1/Sqrt[a*c - b*(a - c)*x - b^2*x^2]
, x] /; FreeQ[{a, b, c, d}, x] && EqQ[b + d, 0] && GtQ[a + c, 0]

Rule 619

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dist[1/(2*c*((-4*c)/(b^2 - 4*a*c))^p), Subst[Int[Si
mp[1 - x^2/(b^2 - 4*a*c), x]^p, x], x, b + 2*c*x], x] /; FreeQ[{a, b, c, p}, x] && GtQ[4*a - b^2/c, 0]

Rule 216

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[(Rt[-b, 2]*x)/Sqrt[a]]/Rt[-b, 2], x] /; FreeQ[{a, b}
, x] && GtQ[a, 0] && NegQ[b]

Rubi steps

\begin{align*} \int \frac{1}{\sqrt{4-x} \sqrt{x}} \, dx &=\int \frac{1}{\sqrt{4 x-x^2}} \, dx\\ &=-\left (\frac{1}{4} \operatorname{Subst}\left (\int \frac{1}{\sqrt{1-\frac{x^2}{16}}} \, dx,x,4-2 x\right )\right )\\ &=-\sin ^{-1}\left (1-\frac{x}{2}\right )\\ \end{align*}

Mathematica [A]  time = 0.0099107, size = 14, normalized size = 1.4 \[ -2 \sin ^{-1}\left (\sqrt{1-\frac{x}{4}}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[1/(Sqrt[4 - x]*Sqrt[x]),x]

[Out]

-2*ArcSin[Sqrt[1 - x/4]]

________________________________________________________________________________________

Maple [B]  time = 0.004, size = 27, normalized size = 2.7 \begin{align*}{\sqrt{ \left ( -x+4 \right ) x}\arcsin \left ( -1+{\frac{x}{2}} \right ){\frac{1}{\sqrt{-x+4}}}{\frac{1}{\sqrt{x}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(-x+4)^(1/2)/x^(1/2),x)

[Out]

((-x+4)*x)^(1/2)/(-x+4)^(1/2)/x^(1/2)*arcsin(-1+1/2*x)

________________________________________________________________________________________

Maxima [B]  time = 1.42676, size = 19, normalized size = 1.9 \begin{align*} -2 \, \arctan \left (\frac{\sqrt{-x + 4}}{\sqrt{x}}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(4-x)^(1/2)/x^(1/2),x, algorithm="maxima")

[Out]

-2*arctan(sqrt(-x + 4)/sqrt(x))

________________________________________________________________________________________

Fricas [B]  time = 2.02496, size = 45, normalized size = 4.5 \begin{align*} -2 \, \arctan \left (\frac{\sqrt{-x + 4}}{\sqrt{x}}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(4-x)^(1/2)/x^(1/2),x, algorithm="fricas")

[Out]

-2*arctan(sqrt(-x + 4)/sqrt(x))

________________________________________________________________________________________

Sympy [A]  time = 1.00913, size = 26, normalized size = 2.6 \begin{align*} \begin{cases} - 2 i \operatorname{acosh}{\left (\frac{\sqrt{x}}{2} \right )} & \text{for}\: \frac{\left |{x}\right |}{4} > 1 \\2 \operatorname{asin}{\left (\frac{\sqrt{x}}{2} \right )} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(4-x)**(1/2)/x**(1/2),x)

[Out]

Piecewise((-2*I*acosh(sqrt(x)/2), Abs(x)/4 > 1), (2*asin(sqrt(x)/2), True))

________________________________________________________________________________________

Giac [A]  time = 1.06964, size = 11, normalized size = 1.1 \begin{align*} 2 \, \arcsin \left (\frac{1}{2} \, \sqrt{x}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(4-x)^(1/2)/x^(1/2),x, algorithm="giac")

[Out]

2*arcsin(1/2*sqrt(x))